<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>发表新帖 - 智界论坛</title>
  <link rel="stylesheet" href="css/tech-style.css">
</head>
<body>
<nav class="navbar">
  <div class="main-container">
    <a href="index.jsp" class="navbar-brand">智界论坛</a>
         <ul class="navbar-nav">
             <li><a href="index.jsp">首页</a></li>
      <li><a href="postForm.jsp">发帖</a></li>
      <c:choose>
        <c:when test="${not empty sessionScope.user}">
          <li><a href="logout">注销</a></li>
        </c:when>
        <c:otherwise>
          <li><a href="login.jsp">登录</a></li>
          <li><a href="register.jsp">注册</a></li>
        </c:otherwise>
      </c:choose>
    </ul>
  </div>
</nav>

<main class="main-container" style="padding-top: 2rem; padding-bottom: 2rem;">
  <div class="card">
    <div class="card-header">
      <h3>发表新帖</h3>
    </div>
    <div class="card-body">
      <form method="post" action="post" accept-charset="UTF-8">
        <div class="form-group">
          <label class="form-label" for="title">标题</label>
          <input type="text" id="title" name="title" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="form-label" for="content">内容</label>
          <textarea id="content" name="content" rows="18" class="form-control" required></textarea>
        </div>
        <div class="form-group">
          <button type="submit" class="btn btn-primary">发表</button>
        </div>
      </form>
    </div>
  </div>
</main>

<footer class="footer">
  <div class="footer-content">
    <p>&copy; 2025 智界论坛</p>
    <p>科技改变未来</p>
  </div>
</footer>
</body>
</html>